projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0b21883
)
gtk-demo: Fix a memory leak
author
Matthias Clasen
<mclasen@redhat.com>
Fri, 7 Aug 2020 19:15:18 +0000
(15:15 -0400)
committer
Matthias Clasen
<mclasen@redhat.com>
Fri, 7 Aug 2020 19:15:18 +0000
(15:15 -0400)
The colors demo was leaking a reference to its model.
This was showing up as crash when you manage to close
both the demo window and the main window while the
sorting is ongoing.
demos/gtk-demo/listview_colors.c
patch
|
blob
|
history
diff --git
a/demos/gtk-demo/listview_colors.c
b/demos/gtk-demo/listview_colors.c
index b63f2366e013bd49fa5f3eea100fba495b4c2edf..c8cf07cdba82bc6dd9c87fb284d22d08012f3189 100644
(file)
--- a/
demos/gtk-demo/listview_colors.c
+++ b/
demos/gtk-demo/listview_colors.c
@@
-1118,6
+1118,8
@@
do_listview_colors (GtkWidget *do_widget)
gtk_header_bar_pack_end (GTK_HEADER_BAR (header), box);
g_object_bind_property (dropdown, "selected-item", gridview, "factory", G_BINDING_SYNC_CREATE);
+
+ g_object_unref (selection);
}
if (!gtk_widget_get_visible (window))